<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
?>
<div style="padding:25px;"></div>
<?php $form = ActiveForm::begin(['action'=>\app\service\UrlService::BuildUrl('class/addstu')]);?>
    <input type="hidden" value="<?= $classid ?>" name="classid">
    <div class="form-label">未分配班级的学生:打勾后提交，添加到该班级</div>
    <?php foreach($tmps as $key => $tmpinfo): ?>
    <label>
        <div class="form-check-label" style="display:inline-block;padding:8px;">
            <input type="checkbox" class="form-check-inline" name="addstudent[]" value="<?=$tmpinfo['student_id'] ?>" title="<?=$tmpinfo['email']?>">
            <?=$tmpinfo['name']?>
        </div>
    </label>
    <?php Endforeach; ?>
    <hr>
    <div class="form-label">班级内的学生:取消选中可将学员移除该班级</div>
    <?php foreach($stus as $key => $stusinfo): ?>
    <label>
        <div class="form-check-label" style="display:inline-block;padding:8px;">
            <input type="checkbox" checked name="edCheck[]" class="form-check-inline" value="<?=$stusinfo['sid'] ?>" title="<?=$stusinfo['email']?>">
            <?=$stusinfo['name']?>
        </div>
    </label>
    <?php Endforeach; ?>
<br />
<br />
<br />
<button type="submit" class="btn btn-danger">添加/修改</button>
<?php ActiveForm::end(); ?>
